home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
TURB_VIS
/
PGC122
/
BBSTRRES.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-02-09
|
2KB
|
20 lines
(* This file was mangled by Mangler 1.14 (c) Copyright 1993 by Berend de Boer *)
{$IFDEF DPMI} {$X+,S-} {$ELSE} {$X+,F+,O+,R-,Q-} {$ENDIF} UNIT BBSTRRES ;INTERFACE USES OBJECTS ;
CONST STRRESBUFSIZE :WORD =4096 ;STRINGS :PSTRINGLIST =NIL ;PROCEDURE LOADSTRINGS ;PROCEDURE DONESTRINGS ;FUNCTION RSGET
(SKEY :WORD ):STRING ;FUNCTION RSGET1 (SKEY :WORD ;PARAM1 :LONGINT ):STRING ;FUNCTION RSGET2 (SKEY :WORD ;
PARAM1 ,PARAM2:LONGINT ):STRING ;IMPLEMENTATION USES DOS , BBGUI , BBFILE , BBUTIL ;CONST O1lOIl0IIIIO:PRESOURCEFILE=NIL
;PROCEDURE LOADSTRINGS ;VAR OIOO:DIRSTR;OO0O:NAMESTR;OIOl:EXTSTR;BEGIN FSPLIT (PARAMSTR (0 ), OIOO , OO0O , OIOl );IF NOT
FILEEXIST (OIOO + 'STRINGS.TVR')THEN BEGIN PRINTERROR ('File '+ OIOO + ' STRINGS.TVR could not be found.', 0 );HALT (1 );
END ;O1lOIl0IIIIO := NEW (PRESOURCEFILE , INIT (NEW (PBUFSTREAM , INIT (OIOO + 'STRINGS.TVR', STOPENREAD , STRRESBUFSIZE
))));IF O1lOIl0IIIIO ^. STREAM ^. STATUS =STOK THEN STRINGS := PSTRINGLIST (O1lOIl0IIIIO ^. GET ('Strings'));
CASE O1lOIl0IIIIO ^. STREAM ^. STATUS OF STOK :EXIT ;STGETERROR :PRINTERROR
('TStringList not registered. Unable to load Strings from resource file STRINGS.TVR.', 0 );STINITERROR :PRINTERROR
('Cannot initialize stream. Unable to load Strings from resource file STRINGS.TVR.', 0 );ELSE PRINTERROR
('Unable to load Strings from resource file STRINGS.TVR.', 0 );END ;HALT (1 );END ;PROCEDURE DONESTRINGS ;BEGIN DISPOSE
(STRINGS , DONE );DISPOSE (O1lOIl0IIIIO , DONE );STRINGS := NIL ;O1lOIl0IIIIO := NIL ;END ;FUNCTION RSGET
(SKEY:WORD):STRING ;BEGIN RSGET := STRINGS ^. GET (SKEY );END ;FUNCTION RSGET1 (SKEY:WORD;PARAM1:LONGINT):STRING ;
VAR OO1O:STRING ;OO01:LONGINT;BEGIN OO01 := PARAM1 ;FORMATSTR (OO1O , STRINGS ^. GET (SKEY ), OO01 );RSGET1 := OO1O ;
END ;FUNCTION RSGET2 (SKEY:WORD;PARAM1,PARAM2:LONGINT):STRING ;VAR OO1O:STRING ;OO01:ARRAY [ 0 .. 1 ] OF LONGINT;
BEGIN OO01 [ 0 ] := PARAM1 ;OO01 [ 1 ] := PARAM2 ;FORMATSTR (OO1O , STRINGS ^. GET (SKEY ), OO01 );RSGET2 := OO1O ;END ;
END .